import React, { PropTypes, Component } from 'react';
import MenuItem from './TreeNode'

class SubMenu extends Component {

  static propTypes = {
    list: React.PropTypes.array.isRequired
  }

  render () { return (
      <ul className="sub-tree">
        {this.props.list.map(item => {
          return <MenuItem checkable={this.props.checkable} onCKBClick={this.props.onCKBClick} level={this.props.level} data={item} key={item.id} />
        })}
      </ul>
    )
  }

}

export default SubMenu

